<template>
  <div id="app">
    <xframe v-if="isLogin"></xframe>
    <login v-else></login>
  </div>
</template>

<script>
export default {
  components: {
    login: () => import("./views/login.vue"),
    xframe: () => import("./views/frame/index.vue")
  },
  computed: {
    isLogin: function() {
      return this.$store.state.account.isLogin;
    }
  },
  created() {
    this.$http({
      url: this.$URL_ADDR.my.nologin,
      method: "GET"
    }).then(resp => {
      this.$store.dispatch("account/login", resp.data);
    });
  },
  methods: {}
};
</script>
